package test;

import java.util.Scanner;

public class Demo3 {

    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()) {
            scanner.nextLine();
            String line = scanner.nextLine();
            String[] s = line.split(" ");
            System.out.println(Integer.parseInt(s[s.length - 1]) + Integer.parseInt(s[s.length - 2]));


        }

    }
}
